GtkButton: Deprecated setters and getters as well
authorMatthias Clasen <mclasen@redhat.com>
Wed, 14 May 2014 02:19:30 +0000 (22:19 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 14 May 2014 02:19:30 +0000 (22:19 -0400)
gtk_button_set/get_alignment should be deprecated together
with the properties they are setters/getters for.

gtk/gtkbutton.c
gtk/gtkbutton.h
gtk/gtkcheckbutton.c

index 00d01d2af75df3ded008a55e9cd57088237f8f9e..fe1549928814b6bd55fae710406d986b923c6321 100644 (file)
@@ -802,10 +802,14 @@ gtk_button_set_property (GObject         *object,
       gtk_button_set_focus_on_click (button, g_value_get_boolean (value));
       break;
     case PROP_XALIGN:
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       gtk_button_set_alignment (button, g_value_get_float (value), priv->yalign);
+G_GNUC_END_IGNORE_DEPRECATIONS
       break;
     case PROP_YALIGN:
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       gtk_button_set_alignment (button, priv->xalign, g_value_get_float (value));
+G_GNUC_END_IGNORE_DEPRECATIONS
       break;
     case PROP_IMAGE_POSITION:
       gtk_button_set_image_position (button, g_value_get_enum (value));
@@ -2481,6 +2485,9 @@ gtk_button_get_focus_on_click (GtkButton *button)
  * the child is a #GtkMisc or a #GtkAlignment.
  *
  * Since: 2.4
+ *
+ * Deprecated: 3.14: Access the child widget directly if you need to control
+ * its alignment.
  */
 void
 gtk_button_set_alignment (GtkButton *button,
@@ -2514,6 +2521,9 @@ gtk_button_set_alignment (GtkButton *button,
  * Gets the alignment of the child in the button.
  *
  * Since: 2.4
+ *
+ * Deprecated: 3.14: Access the child widget directly if you need to control
+ * its alignment.
  */
 void
 gtk_button_get_alignment (GtkButton *button,
index 70ce41e0bee310280fbc9c026e417061a5d5091d..261772245de66ccd0b3d0cef7cc9a43151df307c 100644 (file)
@@ -139,11 +139,11 @@ void                  gtk_button_set_focus_on_click (GtkButton      *button,
                                                     gboolean        focus_on_click);
 GDK_AVAILABLE_IN_ALL
 gboolean              gtk_button_get_focus_on_click (GtkButton      *button);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
 void                  gtk_button_set_alignment      (GtkButton      *button,
                                                     gfloat          xalign,
                                                     gfloat          yalign);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
 void                  gtk_button_get_alignment      (GtkButton      *button,
                                                     gfloat         *xalign,
                                                     gfloat         *yalign);
index 622ec5f8b2ba1dddfc63abff1779c7bfaf139642..0c6ddbd109e37857e08460e37669e90d9b026d09 100644 (file)
@@ -130,10 +130,12 @@ draw_indicator_changed (GObject    *object,
 {
   GtkButton *button = GTK_BUTTON (object);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   if (gtk_toggle_button_get_mode (GTK_TOGGLE_BUTTON (button)))
     gtk_button_set_alignment (button, 0.0, 0.5);
   else
     gtk_button_set_alignment (button, 0.5, 0.5);
+G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static void